<?php

if (!defined('access')){
	die ('Direct access Denied!');
} else {

	$membre = new User($_GET['profil_id']);
	$profil = new Profil($_GET['profil_id']);
?>
	<div id="profil-left">
		<?php if (isset($_SESSION['userid']) && $_SESSION['userid'] == $_GET['profil_id']): echo '<a href="index.php?page=profil&function=edit">Editer mon profil</a>'; endif; ?>
		<div id="profil-member">
			<div id="avatar">
				<img src="images/avatars/avatar_<?php echo $_GET['profil_id']; ?>.jpg" width="100px" height="100px"/>
			</div>
			<div id="profil-short" style="">
				<div><?php echo $membre->getName(); ?></div>
				<div><?php echo strftime('%d %B %Y',strtotime($membre->getCreate())); ?></div>
				<br />
				<div><a href="mailto:<?php echo $membre->getMail(); ?>"><?php echo $membre->getMail(); ?></a></div>
				<div><span>LICENCE</span>(<span>S</span>-<span>D</span>-<span>DM</span>)</div>
			</div>
		</div>
		<div id="profil-details">
			<div><?php echo $profil->getNom(); ?></div>
			<div><?php echo $profil->getPrenom(); ?></div>
			<div>
				<?php echo strftime('%Y',strtotime(date('Y-m-d'))-strtotime($membre->getBirthday()))-1970; ?> ans
			 	- 
				<?php echo strftime('%d %b %Y',strtotime($membre->getBirthday())); ?>
			</div>
			<br />
			<div><?php echo $profil->getFix(); ?></div>
			<div><?php echo $profil->getPort(); ?></div>
			<div><?php echo $profil->getProfession(); ?></div>
			<br />
			<div><?php echo $profil->getAdresse(); ?></div>
			<div><?php echo $profil->getCP(); echo $profil->getVille(); ?></div>
		</div>
	</div>
<?php } ?>
<!-- DISPOSITION DE LA PAGE
	________________________________________________________________________________________________
	|										|														|
	|		_____________					|														|
	|		|			 |		pseudo		|			SES TOURNOIS								|
	|		|			 |		since		|			------------								|
	|		|			 |					|			________________________________			|
	|		|			 |		@-mail		|			|_______________________________|			|
	|		|____________|		LICENCE		|			|_______________________________|			|
	|										|			|_______________________________|			|
	|_______________________________________|			|_______________________________|			|
	|										|														|
	|										|														|
	|	Nom									|														|
	|	Prenom								|														|
	|	Age									|														|
	|										|														|
	|	Fix									|														|
	|	Port								|														|
	|	Profession							|														|
	|										|														|
	|	Adresse (!add)						|														|
	|	CP				Ville				|														|
	|										|														|
	|_______________________________________________________________________________________________|
	
-->